Digital Living Network Alliance (DLNA) is an alliance organization that is composed by the manufacturers of consumer electronics products, mobile phones and computers. The DLNA is responsible for defining unified transmission specifications to allow a variety of products from different manufacturers to communicate with each other. Consequently, the video and audio devices that comply with the DLNA protocol can be in direct communication with each other, make synchronization or even transfer data.
The devices that are operated under the DLNA environment include for example a digital media server (DMS), a digital media controller (DMC) and a digital media renderer (DMR). When plural digital media renderers, a digital media server and a digital media controller are in wireless communication with each other, the plural digital media renderers may receive audio data from the digital media server in a wireless transmission manner and play the audio data. Generally, the plural digital media renderers have respective system clocks. However, these system clocks are not always identical. If the system clocks are different, the audio playback actions of plural digital media renderers cannot be synchronized with each other. Therefore, it is an important issue to synchronize the system clocks of the plural digital media renderers.
Hereinafter, a conventional time synchronization method for synchronizing the system clocks of plural digital media renderers will be illustrated with reference to FIG. 1. FIG. 1 is a flowchart illustrating a conventional time synchronization method.
In a step S1, a packet is firstly broadcasted from a first digital media renderer 10 to a base station 11, and then the packet is broadcasted from the base station 11 to the first digital media renderer 10 and a second digital media renderer 12.
Then, a step S2 and a step S3 are performed. After the packet is received by the second digital media renderer 12, a time point of receiving the packet by the second digital media renderer 12 is recorded into the second digital media renderer 12. Then, the second digital media renderer 12 issues a retrieve request to the first digital media renderer 10 in order to acquire a time point of receiving the packet by the first digital media renderer 10. In response to the retrieve request, the time point of receiving the packet by the first digital media renderer 10 is broadcasted to the second digital media renderer 12.
Then, in a step S4, a time difference between the time point of receiving the packet by the second digital media renderer 12 and the time point of receiving the packet by the first digital media renderer 10 is calculated by the second digital media renderer 12. In a step S5, the time difference is added to or subtracted from the system time of the system clock of the second digital media renderer 12 by the second digital media renderer 12, so that the system time of the system clock of the second digital media renderer 12 is synchronized with the system time of the system clock of the first digital media renderer 10.
As mentioned above, after the time difference between the time points of receiving the same packet by the first digital media renderer 10 and the second digital media renderer 12 is calculated, the second digital media renderer 12 may correct the system time of the system clock thereof. Consequently, the purpose of synchronizing the system time of the system clock of the second digital media renderer 12 with the system time of the system clock of the first digital media renderer 10 will be achieved. However, after the conventional time synchronization method has been implemented for a long term, the error is gradually increased.
Therefore, there is a need of providing an improved time synchronization method in order to overcome the above drawbacks.